layout.tsx 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { Banner } from "fumadocs-ui/components/banner";
  2. import { DocsLayout } from "fumadocs-ui/layouts/docs";
  3. import Link from "next/link";
  4. import type { ReactNode } from "react";
  5. import { docsOptions } from "../../../config/layout.config";
  6. export default async function Layout({
  7. children,
  8. params,
  9. }: {
  10. children: ReactNode;
  11. params: Promise<{ section: string }>;
  12. }) {
  13. const { section } = await params;
  14. return (
  15. <>
  16. {section === "entropy" && (
  17. <Banner changeLayout={false} id="entropy-v2" variant="rainbow">
  18. <span>
  19. <strong>
  20. Try the{" "}
  21. <a
  22. href="https://entropy-explorer.pyth.network/"
  23. target="_blank"
  24. rel="noopener noreferrer"
  25. >
  26. Entropy Explorer
  27. </a>
  28. </strong>{" "}
  29. to track and debug callback issues. &nbsp;|&nbsp;
  30. <Link href="./entropy/whats-new-entropyv2">
  31. Learn what&apos;s new in Entropy v2.
  32. </Link>
  33. </span>
  34. </Banner>
  35. )}
  36. <DocsLayout {...docsOptions}>{children}</DocsLayout>
  37. </>
  38. );
  39. }